<!DOCTYPE html>
<?php
session_start();
if(isset($_SESSION["uid"])){
    //要求管理员才能访问
    if($_SESSION["Usertype"]==1){
        
    }else{
      echo "<script>location='shouye.php';</script>";  
    }
}else{
  echo "<script>location='denglu.php';</script>";
}
?>
<?php
 require 'common/mysqlCommon.php';  //将其他的php文件的代码引入当前页面
?>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        if(isset($_GET["id"])){
            $id=(int)$_GET["id"];
            if($id){
                $sqlstring="delete from gmz where uid=$id";
                $result= getResultBySQL($sqlstring);
                    if($result){
                        echo "<script>alert('删除成功！');"
                        . "location='gongmingzhe.php';</script>";
                    }else{
                        echo "删除数据失败！";
                    }
            }
        }else{
            echo "参数错误!";
        }
        ?>
    </body>
</html>
